package org.kernely.ui.home;

import org.kernely.ui.mvp.IKernelyView;

import com.vaadin.ui.Component;
import com.vaadin.ui.GridLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.Panel;

/**
 * View of the Kernely Home page.
 */
public class KernelyHomeView extends GridLayout implements IKernelyView{
	
	/**
	 * The Serial Version ID
	 */
	private static final long serialVersionUID = -8282968803715125157L;
	
	private Panel eastPanel;
	private Label northLabel;
	private Label southLabel;
	private Label eastLabel;
	
	/**
	 * KernelyHomeView's constructor
	 */
	public KernelyHomeView(){
		this.setColumns(4);
		this.setRows(2);
		Panel northPanel = new Panel();
		Panel southPanel = new Panel();
		eastPanel = new Panel();
		northLabel = new Label("Kernely home page");
		southLabel = new Label("Welcome on Kernely!");
		eastLabel = new Label("Here will come some informations.");

		this.addComponent(northPanel,0,0);
		this.addComponent(southPanel,0,1);
		this.addComponent(eastPanel,1,0,3,1);
		northPanel.addComponent(northLabel);
		southPanel.addComponent(southLabel);
		eastPanel.addComponent(eastLabel);
	}

	/**
	 * @see org.kernely.core.service.IKernelyView#getComponent()
	 */
	@Override
	public final Component getComponent() {
		return this;
	}

	/**
	 * Gets the eastPanel
	 * @return the eastPanel
	 */
	public final Panel getEastPanel() {
		return eastPanel;
	}

	/**
	 * Gets the southLabel
	 * @return the southLabel
	 */
	public final Label getSouthLabel() {
		return southLabel;
	}

	/**
	 * Gets the eastLabel
	 * @return the eastLabel
	 */
	public final Label getEastLabel() {
		return eastLabel;
	}

	
	
}
